{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Numpy中的linspace()函数类似于arange()、range()函数；  \n",
    "arange()、range()函数可以通过指定开始值、终止值和步长来创建一维等差数组。   \n",
    "\n",
    "返回在指定范围内的均匀间隔的数字组成的数组，即返回一个等差数列。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**语法：**  \n",
    "linspace(start,stop[,num=50[,endpoint=True[,retstep=False[,dtype=None]]]])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Return evenly(adv. 平坦地；均匀地；不卑不亢地) spaced numbers over a specified interval.   \n",
    "\n",
    "Return `num` evenly spaced samples, calculated over the interval [`start`, `stop`].  \n",
    "\n",
    "The endpoint of the interval can optionally be excluded.  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2.        , 2.02040816, 2.04081633, 2.06122449, 2.08163265,\n",
       "       2.10204082, 2.12244898, 2.14285714, 2.16326531, 2.18367347,\n",
       "       2.20408163, 2.2244898 , 2.24489796, 2.26530612, 2.28571429,\n",
       "       2.30612245, 2.32653061, 2.34693878, 2.36734694, 2.3877551 ,\n",
       "       2.40816327, 2.42857143, 2.44897959, 2.46938776, 2.48979592,\n",
       "       2.51020408, 2.53061224, 2.55102041, 2.57142857, 2.59183673,\n",
       "       2.6122449 , 2.63265306, 2.65306122, 2.67346939, 2.69387755,\n",
       "       2.71428571, 2.73469388, 2.75510204, 2.7755102 , 2.79591837,\n",
       "       2.81632653, 2.83673469, 2.85714286, 2.87755102, 2.89795918,\n",
       "       2.91836735, 2.93877551, 2.95918367, 2.97959184, 3.        ])"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "np.linspace(2.0, 3.0, num=50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([2. , 2.2, 2.4, 2.6, 2.8])"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.linspace(2.0, 3.0, num=5, endpoint=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([2. , 2.2, 2.4, 2.6, 2.8]), 0.2)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.linspace(2.0, 3.0, num=5, endpoint=False, retstep=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([2.  , 2.25, 2.5 , 2.75, 3.  ]), 0.25)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.linspace(2.0, 3.0, num=5, endpoint=True, retstep=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Graphical illustration"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAD8CAYAAABzTgP2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAADzRJREFUeJzt23+s3Xddx/Hny14YA+J+drC1q51ZHRaNTk8GiJqFsa2LQhedsRi1MTP9hyk/FO0kZjD4Ywg6NCwkzTZtJmGQOaERtZYNYmLI7O1GMsqoreVH71pZSbfpZDIKb/+435L7ubldb3vOvWff3ucjac75fs/nnu/7bE2f93y/56S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x3qkWXpKVwC8Bd457lsWQ5IeBXwTuAqiq56rqqfFOtSgmgDOTTAAvBQ6OeZ6Rq6p/BY7M2r0e2Nrd3wpcvxDHXiphWAEcmLE9xRL4R/KYJKuBy4GHxjvJovgw8EfA98c9yCL5UeAw8Nfd6bM7k7xs3EMtpKp6HPgQ8A3gEPB0Vf3LeKdaNK+oqkMw/csfcMFCHGSphCFz7FsSH8dK8nLg74C3V9V/j3uehZTkl4EnqmrXuGdZRBPAzwAfrarLgf9lgU4vvFB059XXA5cAFwEvS/Kb453q9LJUwjAFXDxjeyWn4VvP2ZK8iOkofKyq7h/3PIvg9cCbk3yN6dOFb0jyt+MdacFNAVNVdezd4H1Mh+J09kbgq1V1uKq+C9wP/NyYZ1os30xyIUB3+8RCHGSphGEnsCbJJUlezPSFqm1jnmlBJQnT550fq6q/GPc8i6Gqbq6qlVW1mun/xw9W1Wn9m2RV/RdwIMll3a6rgC+PcaTF8A3gtUle2v09v4rT/IL7DNuAjd39jcCnF+IgEwvxpC80VXU0yU3AdqY/wXB3Ve0e81gL7fXAbwGPJvlit+9PquofxziTFsbvAR/rfunZD/zOmOdZUFX1UJL7gIeZ/vTdI5yG34JO8nHgSuD8JFPALcBtwCeT3Mh0IH9tQY7tN58lSTMtlVNJkqR5MgySpIZhkCQ1DIMkqWEYJEkNwyBJahgGSVLDMEiSGv8PMUve1xudxd0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "N = 8\n",
    "y = np.zeros(N) # 生成的数全部为0\n",
    "x1 = np.linspace(0, 10, N, endpoint=True)\n",
    "x2 = np.linspace(0, 10, N, endpoint=False)\n",
    "plt.plot(x1, y, 'o')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.  , 1.25, 2.5 , 3.75, 5.  , 6.25, 7.5 , 8.75])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x5fca4e0>]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAADvtJREFUeJzt23GM33ddx/Hni+uq2xgZuiNhbfFKsgwWQOZ+NlMSQsCxEk1rAuowIiXi+MM6JASzGaPJ+I8R0T8ak4EjUwkD6yTHRCqgJEZl6a9sbHSlrtZBb8XsYBYIDrqyt3/cr81v14P73d3Pfu93n+cjueS+39/ne7/379ve8373/d0vVYUkqQ3P6XoASdKFY/QlqSFGX5IaYvQlqSFGX5IaYvQlqSFGX5IaYvQlqSFGX5IasqnrARa74ooramZmpusxJGmiHDp06BtVNb3cunUX/ZmZGfr9ftdjSNJESfLVUdZ5eUeSGmL0JakhRl+SGmL0JakhRl+SGmL0JakhRl+SGmL0JakhRl+SGmL0JakhRl+SGmL0JakhRl+SGmL0JakhRl+SGmL0JakhRl+SGmL0JakhRl+SGmL0JakhRl+SGmL0JakhRl+SGmL0JakhI0U/yc4kR5McS3LrErfvSTKf5MHBx9sH+1+Z5N+THE7yUJJfG/cDkCSNbtNyC5JMAfuAG4A54GCS2ap6ZNHSj1XV3kX7/hf4zap6NMmVwKEkB6rq1DiGlyStzCjP9HcAx6rqeFWdBu4Bdo/yxavqP6rq0cHnJ4EngO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Ykm1l4sWW245k6lyQsXKM9UlV/0vU860FV3VZVW6tqhoX/J/9UVRP/7G2tquq/gRNJrh7seh3wSIcjrQdfA65Pcsnge+l1bIAXtzd1PcA4VNWZJHuBAyy8wn5XVR3ueKz14FXAW4CHkzw42PcHVfWpDmfS+vW7wEcGT5yOA2/reJ5OVdX9SfYDX2ThL+EeYAO8M9d35EpSQzbK5R1J0giMviQ1xOhLUkOMviQ1xOhLUkOMviQ1xOhLUkOMviQ15P8AI/r09UCkCR8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(x2, y+0.5, 'o')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD8CAYAAACfF6SlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEB5JREFUeJzt3X2QXXV9x/H3x4RUxAe0rIpJKnQawdRpRe8wWKbWFhiD7RD/sJZMreg45g9FbevQgerQDv5jpa22U2qbQStaK0VKNWPTRkXaznSEYRGLBpqSxocsSWV9gD6Ihei3f+yFWTd3E9hz2Lt3f+/XTGbPwy/n95mT7Cdnz7n3JlWFJKktTxh3AEnS8rP8JalBlr8kNcjyl6QGWf6S1CDLX5Ia1Ev5J/lgknuTfHmR/Unyx0n2JbkjyYv6mFeStDR9Xfl/CNhylP3nA5uGv7YD7+9pXknSEvRS/lX1z8C3jzJkK/DhmnMzcGKSk/uYW5L02K1dpnnWAwfmrc8Mtx2aPyjJduZ+MuCEE0548emnn75M8SRpdbjtttu+WVVTxxq3XOWfEduO+FyJqtoB7AAYDAY1PT39eOeSpFUlydc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kNyW5K8meJG8bd6aVIsmaJLcn+dS4s6wUSU5Mcn2Sfxv+nXnJuDONW5LfGH7vfDnJx5I8cdyZulpV5Z9kDXAVcD6wGdiWZPN4U60Ih4G3V9XzgbOAN3teHvE24K5xh1hh/gj4h6o6HfhpGj8/SdYDbwUGVfUCYA1w4XhTdbeqyh84E9hXVfur6kHgWmDrmDONXVUdqqovDJf/m7lv5vXjTTV+STYAvwhcPe4sK0WSpwIvBT4AUFUPVtV94021IqwFjk+yFngScHDMeTpbbeW/Hjgwb30GS+6HJDkFOAO4ZbxJVoT3Ab8F/GDcQVaQHwdmgb8Y3g67OskJ4w41TlV1D/D7wNeBQ8D9VfXp8abqbrWVf0Zs87WsQ0meDPwN8OtV9V/jzjNOSX4JuLeqbht3lhVmLfAi4P1VdQbwv0DTz86SPJ25OwinAs8BTkjymvGm6m61lf8MsHHe+gZWwY9nfUhyHHPF/9GqumHceVaAs4ELknyVuduDv5DkL8cbaUWYAWaq6uGfDK9n7h+Dlp0LfKWqZqvqIeAG4GfGnKmz1Vb+twKbkpyaZB1zD2V2jjnT2CUJc/dw76qqPxx3npWgqi6rqg1VdQpzf08+V1UTfzXXVVX9J3AgyWnDTecAd44x0krwdeCsJE8afi+dwyp4CL523AH6VFWHk1wM7GbuifwHq2rPmGOtBGcDvwZ8KckXh9t+u6p2jTGTVq63AB8dXkDtB14/5jxjVVW3JLke+AJzr5y7nVXwMQ9+vIMkNWi13faRJD0Klr8kNcjyl6QGWf6S1CDLX5IaZPlLUoMsf0lq0P8DXYEudt2Y/wMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.ylim([-0.5, 1]) # 限定y轴的取值范围\n",
    "plt.plot(x2, y+0.5, 'o')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
